const http = require("http");
const fs = require("fs");
const path = require("path")

const mysql = require("mysql")
var con = mysql.createConnection({
    host:"192.168.17.144",
    port:3306,
    user:"root",
    password:"ddd",
    database:"article"
})
var html = fs.readFileSync("./chapterList.html")
var insertSql = "insert into users values(?,?,?,?)";
var title = $("#title").html(dataObj[0]["chapterName"]);
var publish = $("#publish").html(dataObj[0]["publishTimer"]);
var author = $("#author").html(dataObj[0]["author"]);
var views = $("#views").html(dataObj[0]["views"]);
var content = $("#content").html(dataObj[0]["chapterContent"]);

con.query(insertSql,[title,userName,age,sex],(err,result)=>{
    if(err){
        console.log(err)
    }else{
        console.log(result)
    }
})

http.createServer((req,res)=>{


}).listen(8081)